import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:Exercise
 * User:22954
 * Date:2024-01-03
 * Time:13:42
 */
public class Test {
    public static void main(String[] args) {
//        exercise1();//用方法求最大值
//        exercise2();//求一个数的阶乘
//        exercise3();//求阶乘的和
//        exercise4();//求斐波那契数列的第N项（迭代完成）
//        exercise5();//求和方法重载
        exercise6();//求最大值的方法重载
    }

    public static void exercise1() {
        int a = 15;
        int b = 20;
        int c = 32;
        int max = max1(a, b);
        System.out.println(max);
        max = max2(a, b, c);
        System.out.println(max);
    }

    public static int max1(int a, int b) {
        return a > b ? a : b;
    }

    public static int max2(int a, int b, int c) {
        int max = max1(a, b);
        return max1(max, c);
    }

    public static void exercise2() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long num = fac(n);
        System.out.println(num);
    }

    public static long fac(int n) {
        long ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        return ret;
    }

    public static void exercise3() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long num = facsum(n);
        System.out.println(num);
    }

    public static long facsum(int n) {
        long sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += fac(i);
        }
        return sum;
    }

    public static void exercise4() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int num = fib(n);
        System.out.println(num);
    }

    public static int fib(int n) {
        int n1, n2, n3;
        n1 = n2 = n3 = 1;
        for (int i = 0; i < n - 2; i++) {
            n3 = n1 + n2;
            n1 = n2;
            n2 = n3;
        }
        return n3;
    }

    public static void exercise5() {
        int a = 34;
        int b = 23;
        int c = 96;
        int sum = add(a, b);
        System.out.println(sum);
        sum = add(a, b, c);
        System.out.println(sum);
    }

    public static int add(int x, int y) {
        return x + y;
    }

    public static int add(int x, int y, int z) {
        return x + y + z;
    }

    public static void exercise6() {
        int a = 241;
        int b = 38;
        int c = 294;
        System.out.println(max(a,b));
        System.out.println(max(a,b,c));
    }

    public static int max(int x, int y) {
        return x > y ? x : y;
    }

    public static double max(double x, double y, double z) {
        if (x > y) {
            return x > z ? x : z;
        }
        return y > z ? y : z;
    }
}
